<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <title>会员审核</title>
    <link rel="stylesheet" type="text/css" href="/static/css/animate.min.css"/>
    <link rel="stylesheet" type="text/css" href="/static/css/index.css"/>
    <link rel="stylesheet" type="text/css" href="/static/css/mui.min.css"/>
    <link rel="stylesheet" type="text/css" href="/static/css/public.css"/>
    <script src="/static/js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="/static/js/jquery.cookie.js" type="text/javascript" charset="utf-8"></script>
    <script src="/static/js/mui.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="/static/js/index.js" type="text/javascript" charset="utf-8"></script>
    <script src="/static/layer/mobile/layer.js" type="text/javascript" charset="utf-8"></script>
</head>
<body style="background: #f5f5f5;">
	<div class="header">
		<a href="/index/" class="backPage"></a>
		<p class="page_title">会员审核</p>
	</div>
	<div style="width: 100%; height: 0.88rem; background: none;"></div>
	<ul class="shMember">
		{% for v in list %}
        <li>
			<p>{{ v.phone }}</p>
			<a href="javascript:;" onclick="shenhe({{ v.id }},2)">拒绝</a>
			<a href="javascript:;" onclick="shenhe({{ v.id }},1)">同意</a>
		</li>
        {% endfor %}
	</ul>
</body>
<script type="text/javascript">
	function shenhe(mid,type){
        $.ajax({
            type : "POST",
            url:"/apply_operate/",//+tab,
            headers:{"X-CSRFToken":$.cookie('csrftoken')},
            data:{'mid':mid,'type':type}, 
            dataType:'json',		
            success: function(data){
               if(data.code == 1){
                    layer.open({
                        content: data.msg
                        ,skin: 'msg'
                        ,time: 3 //2秒后自动关闭
                    });
                    setTimeout(function(){
                        window.location.reload()
                    },700);
                }else{
                    layer.open({
                        content: data.msg
                        ,skin: 'msg'
                        ,time: 2 //2秒后自动关闭
                    });
                }	
            }
        });
    }
</script>
</html>